<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title><fmt:message key="mainMenu.title" /></title>
		<link type="text/css" rel="stylesheet" href="styles/xtree.css"/>
		<link href="styles/css.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">
			function showMenu(menuId) {
				var url = document.getElementById("menuUrl" + menuId).value;
				if (url != null && url != "") {
					top.mainFrame.window.location.href = "../" + url;
				}
				var currentMenuId = document.getElementById("currentMenu").value;
				document.getElementById("menu" + currentMenuId).style.display = "none";
				document.getElementById("menu" + menuId).style.display = "";
				document.getElementById("currentMenu").value = menuId;
			}
			
			function hideFunctions(menuId) {
				var menuState = document.getElementById("menuState" + menuId);
				var menuTree = document.getElementById("functions" + menuId);
				if (menuState.value == "show") {
					menuState.value = "hide";
					menuTree.style.display = "none";
				} else {
					menuState.value = "show";
					menuTree.style.display = "";
				}
			}
		</script>
	</head>
	<body style="border-right:1px solid gray; background-color: #E8E8E8;">
		<table height="800" width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-bottom: 0; margin-bottom: 0;">
			<tr>
				<td width="100%" height="100%" valign="top" class="webfx-tree-bg">
					<c:forEach var="menu" items="${sessionScope.functionsTree}" varStatus="menuStatus">
						<table id="menu<c:out value="${menu.id}"/>" border="0" cellpadding="0" cellspacing="0"  style="display: <c:if test="${! menuStatus.first}">none</c:if>;">
							<tr>
								<td height="10" colspan="3"></td>
							</tr>
							<tr style="cursor: pointer;" onclick="hideFunctions(<c:out value="${menu.id}"/>)">
								<td width="15">&nbsp;</td>
								<td colspan="2">
									<img src="images/openfoldericon.gif"/> 
									<c:out value="${menu.name}"/>
									<input type="hidden" id="menuState<c:out value="${menu.id}"/>" value="show"/>
									<input type="hidden" id="menuUrl<c:out value="${menu.id}"/>" value="<c:out value="${menu.url}"/>"/>
								</td>
							</tr>
							<tr>
								<td width="15">&nbsp;</td>
								<td colspan="2">
									<c:if test="${menu.childs != null}">
									<table id="functions<c:out value="${menu.id}"/>" border="0" cellpadding="0" cellspacing="0" style="padding-bottom: 0; margin-bottom: 0;display: ;">
										<c:forEach var="function" items="${menu.childs}" varStatus="functionStatus">
										<c:if test="${221 eq function.id}">
										<tr>
											<td colspan="2"><img src="images/T.gif"/><img src="images/openfoldericon.gif"/></td>
											<td>
												<%--a href="<c:out value="${function.url}"/>" target="mainFrame"--%><c:out value="${function.name}"/><%--/a--%>
											</td>
										</tr>
										 
										<tr>
											<td><img src="images/vertline.gif"/></td>
											<td><img src="images/T.gif"/><img src="images/file.gif"/></td>
											<td>
												<a href="listWorkItem.html?mode=vip&type=1" target="mainFrame">高端旅客</a>
											</td>
										</tr>
										
										<tr>
											<td><img src="images/vertline.gif"/></td>
											<td><img src="images/T.gif"/><img src="images/file.gif"/></td>
											<td>
												<a href="listWorkItem.html?mode=transfer&type=1" target="mainFrame">中转航班</a>
											</td>
										</tr>
										
										<tr>
											<td><img src="images/vertline.gif"/></td>
											<td><img src="images/T.gif"/><img src="images/file.gif"/></td>
											<td>
												<a href="listWorkItem.html?mode=abnormal&type=1" target="mainFrame">不正常航班</a>
											</td>
										</tr>
										
										</c:if> 
										<c:if test="${222 eq function.id}">
										<tr>
											<td colspan="2"><img src="images/T.gif"/><img src="images/openfoldericon.gif"/></td>
											<td>
												<%--a href="<c:out value="${function.url}"/>" target="mainFrame"--%><c:out value="${function.name}"/><%--/a--%>
											</td>
										</tr>
										 
										<tr>
											<td><img src="images/vertline.gif"/></td>
											<td><img src="images/T.gif"/><img src="images/file.gif"/></td>
											<td>
												<a href="listWorkItem.html?mode=vip&type=2" target="mainFrame">高端旅客</a>
											</td>
										</tr>
										
										<tr>
											<td><img src="images/vertline.gif"/></td>
											<td><img src="images/T.gif"/><img src="images/file.gif"/></td>
											<td>
												<a href="listWorkItem.html?mode=transfer&type=2" target="mainFrame">中转航班</a>
											</td>
										</tr>
										
										<tr>
											<td><img src="images/vertline.gif"/></td>
											<td><img src="images/T.gif"/><img src="images/file.gif"/></td>
											<td>
												<a href="listWorkItem.html?mode=abnormal&type=2" target="mainFrame">不正常航班</a>
											</td>
										</tr>
										
										</c:if> 
										<c:if test="${223 eq function.id}">
										<tr>
											<td colspan="2"><img src="images/T.gif"/><img src="images/openfoldericon.gif"/></td>
											<td>
												<%--a href="<c:out value="${function.url}"/>" target="mainFrame"--%><c:out value="${function.name}"/><%--/a--%>
											</td>
										</tr>
										 
										<tr>
											<td><img src="images/vertline.gif"/></td>
											<td><img src="images/T.gif"/><img src="images/file.gif"/></td>
											<td>
												<a href="listWorkItem.html?mode=vip&type=3" target="mainFrame">高端旅客</a>
											</td>
										</tr>
										
										<tr>
											<td><img src="images/vertline.gif"/></td>
											<td><img src="images/T.gif"/><img src="images/file.gif"/></td>
											<td>
												<a href="listWorkItem.html?mode=transfer&type=3" target="mainFrame">中转航班</a>
											</td>
										</tr>
										
										<tr>
											<td><img src="images/vertline.gif"/></td>
											<td><img src="images/T.gif"/><img src="images/file.gif"/></td>
											<td>
												<a href="listWorkItem.html?mode=abnormal&type=3" target="mainFrame">不正常航班</a>
											</td>
										</tr>
										
										</c:if> 
										<c:if test="${221 ne function.id && 222 ne function.id && 223 ne function.id}">
										<tr>
											<td colspan="2"><img src="images/T.gif"/><img src="images/file.gif"/></td>
											<td>
												<a href="<c:out value="${function.url}"/>" target="mainFrame"><c:out value="${function.name}"/></a>
											</td>
										</tr>
										</c:if>
										</c:forEach>
									</table>
									</c:if>
								</td>
							</tr>
						</table>
					</c:forEach>
				</td>
			</tr>
			<tr>
				<td>
					<input type="hidden" id="currentMenu" name="currentMenu" value="<c:out value="${sessionScope.functionsTree[0].id}"/>" />
				</td>
			</tr>
		</table>
	</body>
</html>
